package com.fandou.airobot.ui.alarm;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

import com.fandou.airobot.data.bean.HomeItem;
import com.fandou.airobot.domain.request.HomeItemRequest;
import com.fandou.airobot.domain.request.Request;

import java.util.List;

public class HomeViewModel extends ViewModel implements Request.IHomeItemRequest {

    public final MutableLiveData<List<HomeItem>> items = new MutableLiveData<>();

    private HomeItemRequest homeItemRequest = new HomeItemRequest();

    @Override
    public LiveData<List<HomeItem>> getHomeItemLiveData() {
        return homeItemRequest.getHomeItemLiveData();
    }

    @Override
    public void requestHomeItem() {
        homeItemRequest.requestHomeItem();
    }
}
